<%@ Control Language="C#" AutoEventWireup="true" CodeFile="TopRatingProduct.ascx.cs" Inherits="Service_TopRatingProduct" %>
<marquee height="250" onmouseover="this.stop()" onmouseout="this.start()" scrollamount="3" direction="up">
<table width="170px" style="margin:0 auto;" cellspacing="10px">
        <tr>
        
            <td>
                <asp:Repeater ID="rpHotProduct" runat="server" DataSourceID="odsTopProduct" OnItemCommand="rpHotProduct_ItemCommand">
                    <ItemTemplate>                                         
                        <div style="float:left; display:block; " id="pic">
                            <p style="padding:0 15px">
                                <asp:Image ID="hotPic" runat="server" ImageUrl='<%# DataBinder.Eval(Container.DataItem, "Picture") %>' Width="100px" Height="70px"/><br />
                                Price : <asp:Label ID="lblHotPrice" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "UnitPrice", "{0:C}") %>' ForeColor="red" /><br />
                                <asp:HyperLink ID="hpHotView" runat="server" Text="View" NavigateUrl='<%# "../productdetail.aspx?ReadID=" + DataBinder.Eval(Container.DataItem, "ProductID") %>' /> |
                                <asp:LinkButton ID="hpAddToCart" runat="server" Text="AddToCart" CommandName="AddToCart" CommandArgument='<%# Bind("ProductID") %>' /><br />                            
                                <b><asp:Label ID="hotTitle" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "ProductName") %>' Font-Names="Tahoma" /></b><br />
                                <asp:Image ID="hotRating" runat="server" ImageUrl='<%# DataBinder.Eval(Container.DataItem, "RatingImage") %>' />
                            </p>
                        </div>                      
                    </ItemTemplate>
                </asp:Repeater>                 
            </td>           
        </tr>
    </table>
 </marquee>    
   
<asp:ObjectDataSource ID="odsTopProduct" runat="server" SelectMethod="GetTop3Product" TypeName="Bll.ProductBll"></asp:ObjectDataSource>
